<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html> 
<head>
<%@ include file="../../include/easyui.jsp" %>
<%@ include file="../../include/pForm.jsp" %>
<%@ include file="/WEB-INF/jsp/include/easyui-layui-upload.jsp" %>
<script src="/plug-in/jquery-easyui-1.5.1/plugins/jquery.choosebox.js"></script>
<title>收入编辑页面</title>
<script>
	$(function(){
		fn.resetForm();
	});
	function selectDepartmant (rows){
		/*if(rows&& rows.length>=1){
			var record = rows[0];
			$('#department').combobox('setValue', record.department || '');
		}*/
	}
	function onOrgNoSelect(record){
		$('input[name=department]').val(record.orgName);	       
	}
</script>
</head>
<body>
	<div class="easyui-panel" data-options="fit:true,border:false" style="padding:10px;">
		<!-- 替换自动form表单 -->
		<form id="easyuiForm" method="post" action="/console/com.fs.jzzn.pojo.Income/modify"   >
		 <!--类名属性及默认主键id-->
		 <input type="hidden" name="className" value="com.fs.jzzn.pojo.Income" />
		 <input type="hidden" name="createrId" value="${SESSION_USER.user.id}" />
		 <input type="hidden" name="id" value="" />
		  <input type="hidden" name="department"  />
		 
		  <div style="margin-bottom:20px">
		 	<input  class="easyui-textbox"  name="incomeNo" style="width:540px;" readonly="readonly"  data-options="label:'单据编号:',required:true,prefix:'SR',timestamp:'yyMMddHHmmss' "/>
		 </div>
		 
		 <div style="margin-bottom:20px">
		  	<select id="contractTitle" class="easyui-combogrid" name="pNo" style="width:540px;"   
			        data-options="
			        	validType:'length[0,45]',
			        	prompt:'输入关键字后自动搜索,订单未出记录此属性可以后期补填', 
			        	label:'订单编号',    
			            panelWidth:455,    
			            idField:'contractNo',    
			            textField:'contractNo',    
			            fitColumns:true,
						nowrap:false,
			            onBeforeLoad: function(param){
			            	param.contractTitle_searchType = 'like';
			            	param.contractTitle= param.q || '';
			           		return  true;
			            },
			            mode:'remote', 
			            url:'/console/com.fs.jzzn.pojo.Contract/list',    
			            columns:[[    
			                 {field: 'contractNo', title: '订单编号', width: 220}
							,{field: 'contractTitle', title: '订单名称', width: 230}
			            ]]">
			 </select>
		 </div>
		 
		  <div style="margin-bottom:20px">
		  	<input class="easyui-numberbox easyui-validatebox" name="money" style="width:270px;" data-options="label:'回款金额(元):',required:true,precision:2" />
		  	<input class="easyui-numberbox  easyui-validatebox" name="incomeRate" style="width:270px;"  data-options="label:'回款比例:',required:true,precision:2,max:1,	prompt:'如回款50%则填写0.50'" />
		 </div>
		 
		  <div style="margin-bottom:20px">
		  	<select class="easyui-combobox" name="incomeType" style="width:270px;" data-options="label:'回款类型:',required:true,prompt:'选择或是自定义输入数据'" 
					url="/console/combobox?valueField=dicName&textField=dicName&modleName=dictionary&pCode=C6&pCode_searchType=eq" >
			 </select>
		  	<input class="easyui-datebox  easyui-validatebox" name="returnedDate" style="width:270px;" data-options="label:'回款日期:',required:true" />
		 </div>
		 
		 <div style="margin-bottom:20px">
		 	<input class="easyui-textbox easyui-validatebox" name="verifyUserName" style="width:270px;" data-options="label:'回款确认人:',required:true" />
		  	<input class="easyui-textbox easyui-validatebox" name="billsNo" style="width:270px;" data-options="label:'凭单号:',required:true" />
		 </div>
		 <div style="margin-bottom:20px">
		 	<input class="easyui-textbox" name="companyName" multiline=true  style="width:540px;" data-options="label:'对方户名:',required:true" />
		 </div>
		 
		 <div  style="margin-bottom:20px">
		 	<select class="easyui-combotreegrid" name="orgNo" style="width:540px;" data-options="label:'组织结构:',panelWidth:300,panelWidth:450,required:true,
	           	idField: 'orgNo', 
	           	missingMessage:'必填项',
				treeField: 'orgName',
				sortName:'orgOrder',
				onSelect:function(row){
					$('input[name=department]').val(row.orgName);	    
				},
				sortOrder:'asc',
	            url:'/console/com.fs.base.pojo.Org/list', 
	            queryParams:{isTreeGrid:'true', treeId:'id', treePid:'parentId' },
	            columns:[[    
	                {field:'orgName',			width:190,	title:'组织名称' }
		         	,{field:'orgType',			width:70,	title:'分类' }
		         	,{field:'orgNo',				width:100,	title:'组织编码' }
		         	,{field:'orgLeaderName',	width:70,	title:'负责人'}
	            ]]"></select>
		 </div>
		 
		 <div style="margin-bottom:20px">
			 <input class="easyui-textbox easyui-validatebox" name="remark" multiline="true"  style="width:540px;height:70px;" data-options="label:'备注:',required:false,validType:'length[0,500]'" />
		 </div>
		 
		 <div style="margin-bottom:20px">
		 	<input class="easyui-layuiupload" name="attachment" style="width:540px;" data-options="label:'附件:',upload:{auto:false,height:250}" />
		 </div>
		</form>
	</div>
</body>
</html>